
#ifndef __SEC_DELAY_H__
#define __SEC_DELAY_H__

#include <stdint.h>

typedef struct
{
	uint32_t ticks;
	uint32_t limit;		//Limit== 0, delay timer stop	
	uint8_t start;		//Set
	uint8_t state;
	uint8_t over;
}DELAY;

void Delay_Set(DELAY *delay, uint16_t sec);
void Delay_Start(DELAY *delay);
void Delay_Stop(DELAY *delay);
void Delay_Pause(DELAY *delay);
void Delay_Resume(DELAY *delay);
void Delay_Restart(DELAY *dly);
void Delay_Check(DELAY *delay);
#endif
